<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
	<meta charset="utf-8">
    <title>Available Truck Location and Destination Edit</title>
<?php echo link_tag(my_url().'skin.css'); ?>
<?php echo link_tag(my_url().'tcal.css'); ?>
<script type="text/javascript" src="<?php echo my_url(); ?>tcal.js"></script> 
<script type="text/javascript" src="<?php echo my_url(); ?>js/1.js"></script>
<script type="text/javascript" src="<?php echo my_url(); ?>js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="<?php echo my_url(); ?>js/jquery-1.6.4.min.js"></script> 
<script type="text/javascript" src="../js/1.js"></script>
<script src="<?php echo my_url(); ?>js/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
 var BaseURL='<?php echo base_url(); ?>';
function redirect(location){
	window.location.href= location;
}

$(document).ready(function(){
 	$("#dv_company_name").change(function(){				
		var _url= BaseURL + "at_l_d/p_getinfo?dv_company_name=" + this.value;
		$.post(_url,"",callbackdisplay);
	});
});

function callbackdisplay(data,status){
		if(status=="success"){
			$("#cell_phone_num").val(data.cell_phone_num);
			$("#f_name").val(data.f_name);
			$("#type_of_truck").val(data.type_of_truck);		
			$("#mc_num").val(data.mc_num);		
		}
}
</script>
<link rel="stylesheet" href="../skin.css" type="text/css" media="screen" /><meta name="author" content="Jaypee Mahilum" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<link href="skin.css" rel="stylesheet" type="text/css" />
</head>
<?php
//echo $_SESSION['administrator_log']."============";
if(!isset($_SESSION['administrator_log']))
{
		echo"Log in first to access this page<html><title>WARNING</title><body><br><a href='".base_url()."administrator' />click here to log in.</a></body></html>";
}
else
{
?>
<body >


	<div class="BodyCover">
 		<div class="ParentContent">
        
	        <?php require("at_menu.php"); ?>
            
			<div class="MenuTab">
    			<div class="MenuBelow"><img src="<?php echo my_url();?>images/below-menu.gif"></div>        
             </div>
	   <div class="title">
			   <h1>Edit Available Truck </h1>
            </div>      
			<div class="module-index1">
		  		<div align="right"><a href="<?php echo base_url()?>admin/logout" style="color:#FF0000;">logout</a></div><br/>
  	                <p class=""><?php if (isset($recordflag)) {echo $recordflag;}?><p>
             <form action="<?php echo base_url() . 'at_l_d/p_edit_at_l_d' . '/' .$this->uri->segment(4)?>"  method="post">
                  <input type="hidden" name="hid_atid" value="<?php echo $info->at_id ?>"  />
                    <label>Nick Name:</label><input name="txtf_name" id="f_name" value="<?php echo $info->f_name ?>" /> <br />
                    <label>Company Name:</label><input name="dv_company_name" id="dv_company_name" value="<?php echo $info->dv_company_name ?>" /> <br />
                    
                    <label>City:</label><input name="txtdrop_off_city" value="<?php echo $info->drop_off_city ?>"/> <br />
                    <label>State:</label> <?php  echo select_list("state","state","state","state_id","state ASC","name=txtdrop_off_state",$info->drop_off_state); ?>  <br />
                    <label>Date:</label><input name="txtdrop_off_date" class="tcal" value="<?php echo $info->drop_off_date ?>" /><br />
                    <label>Des_Zone:</label><input name="txtdes_zone" value="<?php echo $info->des_zone ?>"/><br />
                   	<input type="submit"  value="Save" name="cmdsave">
                    <input type="button"  value="Cancel" onclick="redirect(BaseURL+'at_l_d')" name="cmdcancel">
	        </form>
    		<br>
            <div class="BodyContent">
            </div>	
		</div><!---end of ParentContent ---->
		    <div class="Footer1">	
                <div class="Footer">Copyright &copy; 2011. All Rights Reserved <br><br>
                 <a href="http://webmartis.com"> <img src="http://localhost/wodocontacts/images/wmlink.png"></a>
                </div>                
            </div> <!---end of Footer1 ---->        

    </div> <!---end of BodyCover ---->

</body>

<?php } ?>

</html>
